﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ESRI.ArcGIS.Carto;
using ESRI.ArcGIS.Geodatabase;
using ESRI.ArcGIS.Geometry;

namespace FRS.TinProcessor
{
    public static class TinAnalysis
    {
        /// <summary>
        /// 获取Tin中某点的高程
        /// </summary>
        /// <param name="pTinLayer">Tin图层</param>
        /// <param name="mapX">横坐标值</param>
        /// <param name="mapY">纵坐标值</param>
        /// <returns>某点的高程</returns>
        public static double GetTinElevation(ITinLayer pTinLayer, double mapX, double mapY)
        {
            ISurface pSurface = pTinLayer.Dataset as ISurface;
            IPoint pPoint = new PointClass();
            pPoint.X = mapX;
            pPoint.Y = mapY;
            return pSurface.GetElevation(pPoint);
        }
    }
}
